package StudyCode.summary.mycollection;

import java.util.Iterator;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class PrintingTheContentFromAnIteratorMethod {
	public static <T> void printIterator(final Iterator<T> iterator) {
		int i = 1;
		while (iterator.hasNext()) {
			final T element = iterator.next();
			System.out.println(i + ".)元素:" + element);
			i++;
		}
	}
}
